package com.bluefish.bltuan.module.mail;

public enum EmailVariable {

	USERNAME("%\\{username}"),
	
	PASSWORD("%\\{password}"),
	
	NEW_PASSWORD("%\\{new-password}"),
	
	SUBSCRIBER_CONTENT("%\\{subscriber-content}"),
	
	SUBSCRIBER_TITLE("%\\{subscriber-title}"),
	
	CITY_NAME("%\\{city-name}");
	
	private String key;
	
	private EmailVariable(String key){
		this.key = key;
	}
	
	public static EmailVariable valueOfString(String str){
		String value = str.replaceAll("-", "_").toUpperCase();
		return valueOf(value);
	}
	
	public String getKey() {
		return key;
	}
	
	public String getDisplay(){
		return key.replace("\\{", "{");
	}
}
